/*
 * @Description  : 管网分段信息
 * @Author       : zhao
 * @Date         : 2022-10-21 17:09:52
 * @LastEditors  : zhao
 * @LastEditTime : 2022-11-24 19:33:00
 */

import request from '@/utils/request';

//查看节点
export function findNodes(params) {
    return request({
        url: '/plNode/findNodes',
        method: 'get',
        params: params,
    });
}
//新增节点
export function addNode(params) {
    return request({
        url: '/plNode/addNode',
        method: 'post',
        data: params.data,
    });
}
//更新节点
export function updateNode(params) {
    return request({
        url: '/plNode/updateNode?uuid=' + params.uuid,
        method: 'post',
        data: params.data,
    });
}
//删除节点
export function deleteNode(params) {
    return request({
        url: '/plNode/deleteNode',
        method: 'get',
        params: params,
    });
}
//更新节点串
export function updateNodes(params,uuid) {
    return request({
        url: '/plSection/updateNodes?uuid='+uuid,
        method: 'post',
        data: params,
    });
}
//查看管道分段
export function findSectionSections(params) {
    return request({
        url: '/plSection/findSection?uuid='+params.uuid,
        method: 'get',
        // params: params,
    });
}
//查看线段信息
export function getSections(params) {
    return request({
        url: '/plSection/getSection',
        method: 'get',
        params: params,
    });
}
//查看厂站信息
export function findStations(params) {
    return request({
        url: '/station/findStations',
        method: 'get',
        params: params,
    });
}
//查看附属设置
export function findDevices(params) {
    return request({
        url: '/plDevice/findDevices',
        method: 'get',
        params: params,
    });
}
//查看附属设置
// export function getRegion(params) {
//     return request({
//         url: '/plSection/getRegion',
//         method: 'get',
//         params: params,
//     });
// }
export function getPlSectionSection(params) {
    return request({
        url: '/plSection/getSection',
        method: 'get',
        params: params,
    });
}
// 查看用户的信息
export function getUserInfoApi(params) {
    return request({
        url: '/entInfo/getUserInfo',
        method: 'get',
        params: params,
    });
}
// 查看市区域
export function getCityApi(params,bizRegionId) {
    return request({
        url: '/sysRegionCity/getCity',
        method: 'get',
        params: params,bizRegionId
    });
}
// 查看区县
// export function getCountyApi(params) {
//     return request({
//         url: '/sysRegionCity/getCounty',
//         method: 'get',
//         params: params,
//     });
// }
// 查看该市县区域所有企业
export function getEntInfoApi(params) {
    // console.log(params)
    return request({
        url: '/entInfo/getEntInfo',
        method: 'get',
        params: params,
    });
}
// 查看该企业的所有管线
export function getEntPipelinApi(params) {
    return request({
        url: '/plBase/getEntPipeline',
        method: 'get',
        params: params,
    });
}
// 查看一条管线的所有分段
export function getAllSectionApi(params) {
    return request({
        url: '/plBase/getAllSection',
        method: 'get',
        params: params,
    });
}